home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4UTL003.TIP < prev    next >
Text File  |  1991-12-16  |  4KB  |  96 lines

  1. Batch file users complain justifiably about the ECHO
  2. command's slowness. The problem is most obvious in batch
  3. files that create full-screen displays.
  4.  
  5. To overcome ECHO's sluggishness, I wrote a BASIC program,
  6. MAKEMENU.BAS. The program creates a COM file that displays
  7. up to 24 lines of text.
  8.  
  9. Run MAKEMENU, and either press <Enter> to accept the default
  10. file name MENU.COM or enter another name (you don't have to
  11. enter the COM extension). Next, enter up to 24 lines of text
  12. to be displayed on screen. To enter a blank line, type a
  13. space before pressing <Enter>. Don't enter any dollar signs
  14. ($) anywhere in any of your menus, as this program uses DOS
  15. function 9, which interprets that character as the end of a
  16. string. After pressing <Enter> at the end of each line, type
  17. N for normal display, C for centered, or R for
  18. right-justified output.
  19.  
  20. When you are through typing, press <Enter> at the start of a
  21. new line. You can then insert a call to the generated COM
  22. file into your batch program.
  23.  
  24. Vincent D. O'Connor
  25. Babbitt, Minnesota
  26.  
  27. Editor's note: The file MAKEMENU.BAS appears in the P4UTIL
  28. directory of your PowerBase *.* Volume IV diskette. In
  29. addition to boosting display speed, MAKEMENU lets you
  30. display < and > characters in menus, which the DOS ECHO
  31. command won't do unless you enclose them in quotes. Also,
  32. COM files are more difficult to modify than batch files and
  33. therefore useful for displaying copyrights and disclaimers
  34. that you don't want people to change easily.
  35.  
  36. To run MAKEMENU, use one of the following commands:
  37.  
  38. Your BASIC   Command
  39. ----------   -------
  40. BASICA       BASICA MAKEMENU.BAS
  41. (or clone)
  42.  
  43. GWBASIC      GWBASIC MAKEMENU.BAS
  44.  
  45. QBasic       QBASIC /RUN MAKEMENU.BAS
  46. (from DOS 5)
  47.  
  48. In most versions of BASIC, you can insert a blank line in
  49. your menu by entering a space and pressing <Enter> when
  50. you're asked for a line. But on others, this has the same
  51. effect as pressing <Enter> on its own--MAKEMENU assumes
  52. you're finished creating that menu and asks if you want to
  53. create another. If you have this problem, you can create a
  54. blank line as follows: hold down the <Alt> key, type 255 on
  55. the numeric keypad, release <Alt>, and press <Enter>.
  56.  
  57. If you want, you can store input for MAKEMENU in a text file
  58. and use redirection to get MAKEMENU to process that file.
  59. The listing below (TEST.TXT) shows a sample input file. The
  60. first line should be the COM file name you want to create.
  61. The next 24 lines are strings to display. Starting with the
  62. second line, the first character of each line should be an
  63. `N', `C', or `R' to format the preceding (not the current)
  64. line. The next to last line should have only one of those
  65. three characters. `N' must appear by itself on the last
  66. line. If the text file is named TEST.TXT, you can submit it
  67. to MAKEMENU by adding "< TEST.TXT" to the line you use to
  68. invoke MAKEMENU normally.
  69.  
  70. Postscript: The version of MAKEMENU that originally appeared
  71. in PC World had syntax and type compatibility errors that
  72. caused it to fail when run under QBASIC. The version on the
  73. PowerBase *.* Volume IV disk corrects these problems.
  74.  
  75.  
  76. TEST.TXT: A sample input file that can be passed to MAKEMENU
  77. via redirection. (Extract with Alt-F)
  78.  
  79. ---- BEGIN LISTING ----
  80. testmenu.com
  81. My Menu
  82. C===========================
  83. C:    1. Run a program     :
  84. C:    2. Play a game       :
  85. C:    3. Exit              :
  86. C===========================
  87. C
  88. N
  89. ---- END LISTING ----
  90.  
  91. Title: Giving ECHO a Boost
  92. Category: DOS
  93. Issue date: Mar 1991
  94. Editor: Tom Swan
  95. Supplementary files: P4UTIL\MAKEMENU.BAS
  96.